From 15b51c2fe051c28450f8b17adb451ab159bcfdb9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Tue, 28 Apr 2026 13:49:58 +0200 Subject: [PATCH] workspaceAnimation: Don't exclude minimized windows We may be switching workspaces because we are focusing a window that is located on a different workspace. In case that new focus window was minimized, it currently just pops up out of nowhere after the animation, as we are only tracking windows that are visible at the beginning of the transition. To fix this, don't exclude minimized windows from tracking, but hide them until they are unminimized. Part-of: (cherry picked from commit 620efa31cd2669ef22e6dc24f2a5dca70918ff57) --- js/ui/workspaceAnimation.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js index 844bac451..fcfda8a57 100644 --- a/js/ui/workspaceAnimation.js +++ b/js/ui/workspaceAnimation.js @@ -76,10 +76,20 @@ class BaseWorkspaceGroup extends Clutter.Actor { this._windowRecords.splice(this._windowRecords.indexOf(record), 1); }, this); + windowActor.meta_window.connectObject('notify::minimized', + () => this._syncCloneVisibility(clone), + this); + this._syncCloneVisibility(clone); + this._windowRecords.push(record); return clone; } + _syncCloneVisibility(clone) { + const window = clone.source.meta_window; + clone.visible = window.showing_on_its_workspace(); + } + _removeWindows() { for (const record of this._windowRecords) record.clone.destroy(); @@ -102,7 +112,7 @@ class WorkspaceGroup extends BaseWorkspaceGroup { } _shouldShowWindow(window) { - if (!window.showing_on_its_workspace() || this._isDesktopWindow(window)) + if (this._isDesktopWindow(window)) return false; if (window.is_override_redirect()) -- 2.39.5